package cn.lyjuan.aliyun.mq.conf.java.conf;

import java.util.Properties;

/**
 * 消息队列访问认证配置
 * Created by chad on 2016/9/27.
 */
public class MQAuthCst
{
    /**
     * SpringBean名称
     */
    public static final String QUITE_BEAN_NAME = "mqAuthCst";

    /**
     * 访问控制
     */
    private String accessKey;

    /**
     * 访问控制
     */
    private String secretKey;

    /**
     * 编码
     */
    private String charset;

    public MQAuthCst(Properties pro)
    {
        this(pro.getProperty("mq.accesskey"), pro.getProperty("mq.secretKey"), pro.getProperty("mq.charset"));
    }

    public MQAuthCst(String accessKey, String secretKey, String charset)
    {
        this.accessKey = accessKey;
        this.secretKey = secretKey;
        this.charset = charset;
    }

    public String getAccessKey()
    {
        return accessKey;
    }

    public void setAccessKey(String accessKey)
    {
        this.accessKey = accessKey;
    }

    public String getSecretKey()
    {
        return secretKey;
    }

    public void setSecretKey(String secretKey)
    {
        this.secretKey = secretKey;
    }

    public String getCharset()
    {
        return charset;
    }

    public void setCharset(String charset)
    {
        this.charset = charset;
    }

    @Override
    public String toString()
    {
        return "MQAuthCst{" +
                "accessKey='" + accessKey + '\'' +
                ", secretKey='" + secretKey + '\'' +
                ", charset='" + charset + '\'' +
                '}';
    }
}
